3.172 \(\int \sec ^4(e+f x) (a+b \sec ^2(e+f x))^2 \, dx\)

Optimal. Leaf size=80 \[ \frac {b (2 a+3 b) \tan ^5(e+f x)}{5 f}+\frac {(a+b) (a+3 b) \tan ^3(e+f x)}{3 f}+\frac {(a+b)^2 \tan (e+f x)}{f}+\frac {b^2 \tan ^7(e+f x)}{7 f} \]

[Out]

(a+b)^2*tan(f*x+e)/f+1/3*(a+b)*(a+3*b)*tan(f*x+e)^3/f+1/5*b*(2*a+3*b)*tan(f*x+e)^5/f+1/7*b^2*tan(f*x+e)^7/f

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {4146, 373} \[ \frac {b (2 a+3 b) \tan ^5(e+f x)}{5 f}+\frac {(a+b) (a+3 b) \tan ^3(e+f x)}{3 f}+\frac {(a+b)^2 \tan (e+f x)}{f}+\frac {b^2 \tan ^7(e+f x)}{7 f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^4*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

((a + b)^2*Tan[e + f*x])/f + ((a + b)*(a + 3*b)*Tan[e + f*x]^3)/(3*f) + (b*(2*a + 3*b)*Tan[e + f*x]^5)/(5*f) +
 (b^2*Tan[e + f*x]^7)/(7*f)

Rule 373

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n
)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && IGtQ[q, 0]

Rule 4146

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fre
eFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 + ff^2*x^2)^(m/2 - 1)*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/
2), x]^p, x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && IntegerQ[n/2]

Rubi steps

\begin {align*} \int \sec ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \left (1+x^2\right ) \left (a+b+b x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\operatorname {Subst}\left (\int \left ((a+b)^2+(a+b) (a+3 b) x^2+b (2 a+3 b) x^4+b^2 x^6\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a+b)^2 \tan (e+f x)}{f}+\frac {(a+b) (a+3 b) \tan ^3(e+f x)}{3 f}+\frac {b (2 a+3 b) \tan ^5(e+f x)}{5 f}+\frac {b^2 \tan ^7(e+f x)}{7 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.37, size = 75, normalized size = 0.94 \[ \frac {35 \left (a^2+4 a b+3 b^2\right ) \tan ^3(e+f x)+21 b (2 a+3 b) \tan ^5(e+f x)+105 (a+b)^2 \tan (e+f x)+15 b^2 \tan ^7(e+f x)}{105 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^4*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

(105*(a + b)^2*Tan[e + f*x] + 35*(a^2 + 4*a*b + 3*b^2)*Tan[e + f*x]^3 + 21*b*(2*a + 3*b)*Tan[e + f*x]^5 + 15*b
^2*Tan[e + f*x]^7)/(105*f)

________________________________________________________________________________________

fricas [A]  time = 0.59, size = 94, normalized size = 1.18 \[ \frac {{\left (2 \, {\left (35 \, a^{2} + 56 \, a b + 24 \, b^{2}\right )} \cos \left (f x + e\right )^{6} + {\left (35 \, a^{2} + 56 \, a b + 24 \, b^{2}\right )} \cos \left (f x + e\right )^{4} + 6 \, {\left (7 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 15 \, b^{2}\right )} \sin \left (f x + e\right )}{105 \, f \cos \left (f x + e\right )^{7}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+b*sec(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

1/105*(2*(35*a^2 + 56*a*b + 24*b^2)*cos(f*x + e)^6 + (35*a^2 + 56*a*b + 24*b^2)*cos(f*x + e)^4 + 6*(7*a*b + 3*
b^2)*cos(f*x + e)^2 + 15*b^2)*sin(f*x + e)/(f*cos(f*x + e)^7)

________________________________________________________________________________________

giac [A]  time = 0.28, size = 123, normalized size = 1.54 \[ \frac {15 \, b^{2} \tan \left (f x + e\right )^{7} + 42 \, a b \tan \left (f x + e\right )^{5} + 63 \, b^{2} \tan \left (f x + e\right )^{5} + 35 \, a^{2} \tan \left (f x + e\right )^{3} + 140 \, a b \tan \left (f x + e\right )^{3} + 105 \, b^{2} \tan \left (f x + e\right )^{3} + 105 \, a^{2} \tan \left (f x + e\right ) + 210 \, a b \tan \left (f x + e\right ) + 105 \, b^{2} \tan \left (f x + e\right )}{105 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+b*sec(f*x+e)^2)^2,x, algorithm="giac")

[Out]

1/105*(15*b^2*tan(f*x + e)^7 + 42*a*b*tan(f*x + e)^5 + 63*b^2*tan(f*x + e)^5 + 35*a^2*tan(f*x + e)^3 + 140*a*b
*tan(f*x + e)^3 + 105*b^2*tan(f*x + e)^3 + 105*a^2*tan(f*x + e) + 210*a*b*tan(f*x + e) + 105*b^2*tan(f*x + e))
/f

________________________________________________________________________________________

maple [A]  time = 1.25, size = 104, normalized size = 1.30 \[ \frac {-a^{2} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (f x +e \right )\right )}{3}\right ) \tan \left (f x +e \right )-2 a b \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (f x +e \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (f x +e \right )\right )}{15}\right ) \tan \left (f x +e \right )-b^{2} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (f x +e \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (f x +e \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (f x +e \right )\right )}{35}\right ) \tan \left (f x +e \right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^4*(a+b*sec(f*x+e)^2)^2,x)

[Out]

1/f*(-a^2*(-2/3-1/3*sec(f*x+e)^2)*tan(f*x+e)-2*a*b*(-8/15-1/5*sec(f*x+e)^4-4/15*sec(f*x+e)^2)*tan(f*x+e)-b^2*(
-16/35-1/7*sec(f*x+e)^6-6/35*sec(f*x+e)^4-8/35*sec(f*x+e)^2)*tan(f*x+e))

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 81, normalized size = 1.01 \[ \frac {15 \, b^{2} \tan \left (f x + e\right )^{7} + 21 \, {\left (2 \, a b + 3 \, b^{2}\right )} \tan \left (f x + e\right )^{5} + 35 \, {\left (a^{2} + 4 \, a b + 3 \, b^{2}\right )} \tan \left (f x + e\right )^{3} + 105 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )}{105 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+b*sec(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

1/105*(15*b^2*tan(f*x + e)^7 + 21*(2*a*b + 3*b^2)*tan(f*x + e)^5 + 35*(a^2 + 4*a*b + 3*b^2)*tan(f*x + e)^3 + 1
05*(a^2 + 2*a*b + b^2)*tan(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 4.67, size = 70, normalized size = 0.88 \[ \frac {\mathrm {tan}\left (e+f\,x\right )\,{\left (a+b\right )}^2+{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (\frac {a^2}{3}+\frac {4\,a\,b}{3}+b^2\right )+\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^7}{7}+\frac {b\,{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (2\,a+3\,b\right )}{5}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cos(e + f*x)^2)^2/cos(e + f*x)^4,x)

[Out]

(tan(e + f*x)*(a + b)^2 + tan(e + f*x)^3*((4*a*b)/3 + a^2/3 + b^2) + (b^2*tan(e + f*x)^7)/7 + (b*tan(e + f*x)^
5*(2*a + 3*b))/5)/f

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2} \sec ^{4}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**4*(a+b*sec(f*x+e)**2)**2,x)

[Out]

Integral((a + b*sec(e + f*x)**2)**2*sec(e + f*x)**4, x)

________________________________________________________________________________________